using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace tafei_thingsapi.Models
{
    public class DeviceShare
    {
        public int Id { get; set; }

        [Required]
        public int DeviceId { get; set; }

        [ForeignKey("DeviceId")]
        public Device Device { get; set; }

        [Required]
        public int SharedUserId { get; set; }

        [ForeignKey("SharedUserId")]
        public User SharedUser { get; set; }

        public DateTime SharedAt { get; set; } = DateTime.Now;

        public bool IsActive { get; set; } = true;
    }
} 